﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using System.Security.Cryptography;

namespace Aliyun.Oss
{
	/// <summary>
	/// Bucket service
	/// </summary>
	public interface IBucketService : IOssService
	{
		/// <summary>
		/// GET /
		/// Authorization:
		/// </summary>
		/// <returns></returns>
		IEnumerable<Bucket> All { get; }

		void Exists(string name);
		/// <summary>
		/// delete /bucket-name
		/// 不能为空，先删除里面的文件后再删除
		/// </summary>
		/// <param name="bucketName"></param>
		void Delete(string bucketName);
		/// <summary>
		/// PUT /colorpictures
		/// Authorization
		/// 捕获异常：bucket以存在，不是拥有者
		/// </summary>
		/// <param name="bucket"></param>
		void Create(Bucket bucket);

		/// <summary>
		/// delete /bucket-name?acl
		/// </summary>
		/// <returns></returns>
		string Acl();

		/// <summary>
		/// public-read-write
		/// public-read
		/// private (default)
		/// </summary>
		/// <param name="permission"></param>
		void UpdateAcl(string permission);
	}
}
